package DesignMode.Proxy2.Dynmic;

import JavaSe.Obj;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName DataStructure
 * @Description: TODO
 * @date ${DAT}17:14
 */
public class Client {
    public static void main(String[] args) {
        TeacherDao target = new TeacherDao();
        //给目标对象创建代理对象
        ITeacherDao proxyInstance = (ITeacherDao) new ProxyFactory(target).getProxyInstance();
        //内存中生成了代理对象
        System.out.println(proxyInstance.getClass());

        proxyInstance.teach();
    }
}
